package com.qiguliuxing.dts.common.exception;

import lombok.Getter;

/**
 * 自定义业务异常类
 * @author qiguliuxing
 * @since 1.0.0
 */
public class BizException extends RuntimeException {

    @Getter
    private int code;

    @Getter
    private String message;

    public BizException(String message) {
        super(message);
        this.code = -999;
        this.message = message;
    }

    public BizException(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public BizException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.message = message;
    }
}
